pull: More consistently use remote_repo_local for local repos
authorColin Walters <walters@verbum.org>
Tue, 5 Apr 2016 19:37:32 +0000 (15:37 -0400)
committerColin Walters (automation) <walters+githubbot@verbum.org>
Mon, 11 Apr 2016 13:51:50 +0000 (13:51 +0000)
I think it's cleaner if we use `remote_repo_local` to know
that we have a local repo.  In reality, it might be nicest
if we didn't even create an `OstreeFetcher` for this case,
but untangling the code is tricky.

Closes: #239
Approved by: alexlarsson

src/libostree/ostree-repo-pull.c

index e86ede50e02c67e924cafda7c306ed100a87293e..f292951e227532c1787a1737a976eb091d6b2a36 100644 (file)
@@ -1990,10 +1990,10 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
   else
     {
       pull_data->remote_name = g_strdup (remote_name_or_baseurl);
-      if (!ostree_repo_remote_get_gpg_verify (self, remote_name_or_baseurl,
+      if (!ostree_repo_remote_get_gpg_verify (self, pull_data->remote_name,
                                               &pull_data->gpg_verify, error))
         goto out;
-      if (!ostree_repo_remote_get_gpg_verify_summary (self, remote_name_or_baseurl,
+      if (!ostree_repo_remote_get_gpg_verify_summary (self, pull_data->remote_name,
                                                       &pull_data->gpg_verify_summary, error))
         goto out;
     }
@@ -2123,7 +2123,7 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
       }
 
     if (bytes_sig &&
-        !_ostree_repo_remote_name_is_file (remote_name_or_baseurl) &&
+        !pull_data->remote_repo_local &&
         !_ostree_repo_load_cache_summary_if_same_sig (self,
                                                       remote_name_or_baseurl,
                                                       bytes_sig,
@@ -2177,7 +2177,7 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
 
     if (!summary_from_cache && bytes_summary && bytes_sig)
       {
-        if (!_ostree_repo_remote_name_is_file (remote_name_or_baseurl) &&
+        if (!pull_data->remote_repo_local &&
             !_ostree_repo_cache_summary (self,
                                          remote_name_or_baseurl,
                                          bytes_summary,